function Tab(el) 
{

    this.el = document.querySelector(el)

    this.init() 
}

Tab.prototype.init = function() { 
 
    this.titleOver()
}

Tab.prototype.titleOver = function() { 

    let titleObjs = this.el.querySelectorAll('ul li') 
   
    titleObjs.forEach((item, i) => { 

        item.onmouseover = () => { 
            this.el.querySelector('ul li.active').className = ''
            item.className = 'active'
            this.changeContent(i)
        }
    })
}

Tab.prototype.changeContent = function(i) {
    this.el.querySelector('ol li.active').className = ''
    this.el.querySelectorAll('ol li')[i].className = 'active'
}